<%--                                                                       --%>
<%-- Copyright (c) 2005 BroadVision, Inc.  All rights reserved.            --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<script language="JavaScript">


function doTranslationAdd(form){
    form.action='<c:url value="/ep/blockMultilangAdd.do"/>';
    form.submit();
}

function doTranslationRemove(form,language){
    form.languageToRemove.value = language;
    form.action='<c:url value="/ep/blockMultilangRemove.do"/>';
    form.submit();
}

function doTranslationEdit(form,language,text){
    form.language.value = language;
    form.text.value = text;
}


</script>

<%@include file="/mt/common/pickerPopupHelper.jsp" %>

<c:set var="editImg">
<img src="<%= request.getContextPath() %>/ep/images/action/icon_edit.gif" width="15" height="15" class="actionIcon" border="0" alt='<bean-el:message key="image.alt.edit" bundle="ep.messages"/>' title='<bean-el:message key="image.alt.edit" bundle="ep.messages"/>' >
</c:set>
<c:set var="removeImg">
<img src="<%= request.getContextPath() %>/ep/images/action/icon_remove.gif" width="15" height="15" border="0" class="actionIcon" alt="<bean-el:message key="image.alt.remove" bundle="ep.messages"/>" title="<bean-el:message key="image.alt.remove" bundle="ep.messages"/>">
</c:set>
<c:set var="addImg">
<img src="<%= request.getContextPath() %>/ep/images/action/icon_add.gif" width="15" height="15" border="0" class="actionIcon" alt="<bean-el:message key="image.alt.add" bundle="ep.messages"/>" title="<bean-el:message key="image.alt.remove" bundle="ep.messages"/>">
</c:set>

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">

      <div class="errorMessage"><html-el:errors bundle="ep.messages"/></div>
      
      
      <div class="pageSubsubtitle">
        <span class="left"><bean-el:message key="ep.multilang.channel.subtitle" bundle="ep.multilang"/></span>
        <span class="right">&nbsp;</span>
      </div> 

      <!--start main content area here-->
      <table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="Category" width="100%">
        <tr class="listHeader"> 
          <th id="Name" align="left" width="30%">
            <bean:message key="ep.multilang.language" bundle="ep.multilang"/>
          </th>
          <th id="Value" align="left" width="60%">
            <bean:message key="ep.multilang.translation" bundle="ep.multilang"/>
          </th>
 
          <th id="Actions" align="left" width="10%">
            <bean-el:message key="ep.header.actions" bundle="ep.messages"/>
          </th>

        </tr>

<c:if test="${not empty translations}">
    <c:forEach var="translation" items="${translations}" varStatus="status">

      <c:choose>
        <c:when test="${(status.count + 1) % 2 == 0}">
        <tr class="listEven">
        </c:when> 
        <c:otherwise>
        <tr class="listOdd">
        </c:otherwise>
      </c:choose>

          <td headers="Name">
            <c:out value="${translation.map.language}" />
          </td>
          <td headers="Value">
            <c:out value="${translation.map.text}" />
          </td>
   
          <td headers="Actions">
            <a href="#" onclick="doTranslationEdit(document.epBlockView, '<c:out value="${translation.map.language}"/>', '<c:out value="${translation.map.text}"/>');"><c:out
            value='${editImg}' escapeXml="false"/></a>
            <a href="#" onclick="doTranslationRemove(document.epBlockView,'<c:out value="${translation.map.language}"/>');"><c:out
            value='${removeImg}' escapeXml="false"/></a>
          </td>

        </tr>      
      
    </c:forEach>
  </c:if>

      <input type="hidden" name="languageToRemove" value=""/>
      <tr class="listEven">
          <td headers="Name" class="labelField">
	    <html-el:text property="language" value="${epMultilangForm.map.language}"/>
          </td>
          <td headers="Value" class="labelField">
	    <html-el:text property="text" value="${epMultilangForm.map.text}"/>
          </td>
          <td headers="Actions">
            <a href="#" onclick="doTranslationAdd(document.epBlockView);"><c:out
            value='${addImg}' escapeXml="false"/></a>
          </td>
      </tr>

      </table>


      <!--end main content area here-->
    </td>
  </tr>
</table>
